cmake_minimum_required(VERSION 2.8.3)
project(ins_driver)

add_compile_options(-std=c++11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -std=c++11")

find_package(catkin REQUIRED COMPONENTS
    roscpp
    serial
    )

catkin_package(
    #  INCLUDE_DIRS include
    #  LIBRARIES gnssimu
    #  CATKIN_DEPENDS roscpp
    #  DEPENDS system_lib
    )

###########
## Build ##
###########
include_directories(
    include/
    include/INS570D/
    include/M2/
    ${catkin_INCLUDE_DIRS}
    )

add_library(nmea_paraser
    src/M2/NMEA_PARSER/GPSService.cpp
    src/M2/NMEA_PARSER/NMEACommand.cpp
    src/M2/NMEA_PARSER/NMEAParser.cpp
    src/M2/NMEA_PARSER/NumberConversion.cpp)

add_library(driver
    src/bufferparaseinterface.cpp
    src/INS570D/INS570D_Driver.cpp
    src/INS570D/INS570D_Define.cpp
    src/M2/INSM2_Driver.cpp
    src/M2/INSM2_Define.cpp
    src/insdriverpublisher.cpp
)

## Declare a C++ executable
add_executable(${PROJECT_NAME}
    src/insDriver.cpp)



## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}
    ${catkin_LIBRARIES}
    driver
    nmea_paraser
    )
